modified: openstmerge.py
[GalaxyCodeBases.git] / etc / whichpm / test / Option -a with no names finds many modules
blobc6e4adcb85ac49164178903801fa42d0127a4f47
1 #!/usr/bin/env bash
3 # ---
4 # IMPORTANT: Use the following statement at the TOP OF EVERY TEST SCRIPT
5 # to ensure that this package's 'bin/' subfolder is added to the path so that
6 # this package's CLIs can be invoked by their mere filename in the rest
7 # of the script.
8 # ---
9 PATH=${PWD%%/test*}/bin:$PATH
11 # Helper function for error reporting.
12 die() { (( $# > 0 )) && echo "ERROR: $*" >&2; exit 1; }
14 # Invoke whichpm -a, which lists all locally installed modules.
15 # As a sanity check, we make sure that at least several are output.
16 count=10
17 outCount=$(whichpm -a | head -n $count | wc -l) || die
19 (( outCount == count )) || die "Expected at least $count lines, got $outCount."
21 exit 0